<?php

require 'db_conn.php';
//获取地址栏上送过来的ID值
$bbsid=isset($_GET['id'])?$_GET['id']:0;

$sql="delete from t_message where id='$bbsid'";
$rs=$db->query($sql);
if($rs){
	 echo "<script language='javascript' type='text/javascript'>";
        echo "alert('删除成功！');";
        echo "window.location.href='index.php';"; 
        echo "</script>";
        exit;
}else{
	
        echo "删除失败！";

        exit;
}



?>